home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Networking / TransferProvider1.0d1 / ProviderFactory.h < prev    next >
Encoding:
Text File  |  1997-09-01  |  1.7 KB  |  46 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        ProviderFactory.h
  3.  
  4.     Contains:    Interface to our provider factory library.
  5.  
  6.     Written by:    Quinn "The Eskimo!"
  7.  
  8.     Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.     You may incorporate this sample code into your applications without
  13.     restriction, though the sample code has been provided "AS IS" and the
  14.     responsibility for its operation is 100% yours.  However, what you are
  15.     not permitted to do is to redistribute the source as "DSC Sample Code"
  16.     after having made changes. If you're going to re-distribute the source,
  17.     we require that you make it clear in the source that the code was
  18.     descended from Apple Sample Code, but that you've made changes.
  19. */
  20.  
  21. ////////////////////////////////////////////////////////////
  22. // Pick up general Open Transport stuff.
  23.  
  24. #include <OpenTransport.h>
  25.  
  26. ////////////////////////////////////////////////////////////
  27. // Provider factory definitions.
  28.  
  29. extern OSStatus FactoryCreateEndpoint(EndpointRef *ref, OTClient *currentOwner);
  30.     // This routine creates an endpoint for you, passing back
  31.     // the EndpointRef and the current owner.  You can then
  32.     // call OTTransferProviderOwnership to 
  33.     
  34. ////////////////////////////////////////////////////////////
  35. // Initialisation and termination routines.
  36.  
  37. extern OSStatus InitProviderFactory(void);
  38.     // Call this before calling FactoryCreateEndpoint.
  39.     
  40. extern void CloseProviderFactory(void);
  41.     // Call this after you've created all the endpoints you
  42.     // need from the factory.  Make sure you have transferred
  43.     // the ownership of all these endpoints before calling this,
  44.     // otherwise OT will assume that the factory still owns the
  45.     // endpoints, and clean them up for you!
  46.